

export enum TaskType {
    TRANSPORT
}

export enum TaskStatus {
    PENDING, STARTED
}

/**
 * 运输任务类型
 *
 * 由房间发起任务
 *
 * COLLECT 收集
 * FIND_DROPPED_RESOURCES,
 * FIND_STRUCTURES->STRUCTURE_CONTAINER,
 * ***FIND_TOMBSTONES,
 * ***FIND_RUINS,
 *
 * GET 获取
 * FIND_STRUCTURES->STRUCTURE_LINK,
 * FIND_STRUCTURES->STRUCTURE_STORAGE,
 * **FIND_STRUCTURES->STRUCTURE_TERMINAL,
 * FIND_STRUCTURES->STRUCTURE_LAB,
 * ***FIND_STRUCTURES-STRUCTURE_FACTORY,
 *
 * TRANSFER 搬运
 *
 * from
 *
 * FIND_STRUCTURES->STRUCTURE_SPAWN,
 * FIND_STRUCTURES->STRUCTURE_EXTENSION,
 * FIND_STRUCTURES->STRUCTURE_TOWER,
 * FIND_STRUCTURES->STRUCTURE_LINK,
 * FIND_STRUCTURES->STRUCTURE_LAB,
 * FIND_STRUCTURES->STRUCTURE_STORAGE,
 * **FIND_STRUCTURES->STRUCTURE_TERMINAL,
 * ***FIND_STRUCTURES-STRUCTURE_FACTORY,
 *
 */
// export enum TransportTaskType {
//     COLLECT, GET, TRANSFER
// }

export enum TaskPriority {
    VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH
}

/**
 * 任务
 * id: getUniqueKey
 */
export interface ITask {
    id: number
    type: TaskType
    status: TaskStatus
}

/**
 * 运输任务
 */
export interface ITransportTask extends ITask {
    priority: number
    fromRoomName: string
    targetRoomName: string
    fromId: string
    targetId: string
    resType: ResourceConstant
    amount: number
}


export interface ITransportTaskList {
    [id: number]: ITransportTask
}


declare global {
    interface Memory {
        tasks: {
            [TaskType.TRANSPORT]: ITransportTaskList
        }
    }
}
